﻿/*----------------------------------------------------------------
// Copyright (C) 2011 上海
// 版权所有。 
//
// 文件名：FundsOperatingVM
// 文件功能描述：增减款models层
//
// 
// 创建标识：2012-03-07 王冲
//
// 修改标识：
// 修改描述：
//
//
//----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace WaiGaoQiaoWeb.Models
{
    public class FundsOperatingVM
    {
        /// <summary>
        /// 卡流水号
        /// </summary>
        public int CardNo
        {
            get;
            set;
        }
        /// <summary>
        /// 人员编号
        /// </summary>
        public string EmpNo
        {
            get;
            set;
        }
        /// <summary>
        /// 人员姓名
        /// </summary>
        public string PName
        {
            get;
            set;
        }
        /// <summary>
        /// 卡序列号
        /// </summary>
        public Int64 CardSerial
        {
            get;
            set;
        }
        /// <summary>
        /// 部门名称
        /// </summary>
        public string deptName
        {
            get;
            set;
        }
        /// <summary>
        /// 卡类型（人员类型）
        /// </summary>
        public string PersonTypeName
        {
            get;
            set;
        }
        /// <summary>
        /// 消费余额
        /// </summary>
        public decimal Balance
        {
            get;
            set;
        }
        /// <summary>
        /// 要增减款的卡流水号的集合
        /// </summary>
        public string CardNoAdd
        {
            get;
            set;
        }
        [Display(Name = "增减名称")]
        /// <summary>
        /// 增减类型编号
        /// </summary>
        public int DepositTypeID
        {
            get;
            set;
        }
        [Display(Name = "增减名称")]
        /// <summary>
        /// 增减类型名称
        /// </summary>
        public string DepositName
        {
            get;
            set;
        }
        [Display(Name = "增减金额")]
        [Required(ErrorMessage = "增减金额不能为空")]
        [RegularExpression(@"^[1-9]+(.[0-9]{0,3})?$", ErrorMessage = "增减金额必须为正整数或小数")]
        [Range(0, 100000, ErrorMessage = "增减金额必须在100000元以内")]
        //[Remote("CheckMoney", "FundsOperating", AdditionalFields = "Flag,Money,CardNoAdd", HttpMethod = "POST", ErrorMessage = "减款金额不能大于余额")]
        /// <summary>
        /// 增减金额
        /// </summary>
        public decimal Money
        {
            get;
            set;
        }
        /// <summary>
        /// 标识，用来判断是增款还是减款(Increase增，Reduce减)
        /// </summary>
        public string Flag
        {
            get;
            set;
        }
        /// <summary>
        /// 左边的下拉列表
        /// </summary>
        public string leftbox
        {
            get;
            set;
        }
        /// <summary>
        /// 右边的下拉列表
        /// </summary>
        public string rightbox
        {
            get;
            set;
        }
        /// <summary>
        /// 工号的集合
        /// </summary>
        public string EmpAll
        {
            get;
            set;
        }

        public int GroupIdDept
        {
            get;
            set;
        }
    }
}